import os
import cv2 as cv
import numpy as np
import yaml
import rospy
#from module import IMU_Synchonizer
from module import lowlight_enhancement

if __name__ == '__main__':
    image=cv.imread("/usr/resource/dark/dark1.png")
    cv.imshow("origin",image)
    from PIL import Image as I
    frame = I.fromarray(cv.cvtColor(image, cv.COLOR_BGR2RGB))
    result=lowlight_enhancement.lowlight(frame)
    img = cv.cvtColor(np.asarray(result), cv.COLOR_RGB2BGR)
    cv.imshow("result",img)
    cv.imwrite("/usr/projects/OpticalFlowTest/result/dce.jpg",img)
    cv.waitKey(0)